﻿@model AppVulneravel.Models.Usuario

@{
    ViewBag.Title = "Login";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<style type="text/css">
    body {
        padding-top: 40px;
        padding-bottom: 40px;
        background-color: #eee;
    }

    .form-signin {
        max-width: 330px;
        padding: 15px;
        margin: 0 auto;
    }

        .form-signin .form-signin-heading,
        .form-signin .checkbox {
            margin-bottom: 10px;
        }

        .form-signin .checkbox {
            font-weight: normal;
        }

        .form-signin .form-control {
            position: relative;
            font-size: 16px;
            height: auto;
            padding: 10px;
            -webkit-box-sizing: border-box;
            -moz-box-sizing: border-box;
            box-sizing: border-box;
        }

            .form-signin .form-control:focus {
                z-index: 2;
            }

        .form-signin input[type="text"] {
            margin-bottom: -1px;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }

        .form-signin input[type="password"] {
            margin-bottom: 10px;
            border-top-left-radius: 0;
            border-top-right-radius: 0;
        }
</style>
@using (Html.BeginForm(new { ReturnUrl = ViewBag.ReturnUrl }))
{
    @Html.AntiForgeryToken()
    @Html.ValidationSummary(true)

    <h3>Acesso ao sistema</h3>
    @ViewBag.Erro

    @Html.TextBoxFor(m => m.Login, new { @class = "form-control", @placeholder = "Login" })
    @Html.ValidationMessageFor(m => m.Login)
    @Html.PasswordFor(m => m.Senha, new { @class = "form-control", @placeholder = "Senha" })
    @Html.ValidationMessageFor(m => m.Senha)
    <button class="btn btn-lg btn-primary btn-block" type="submit">Entrar</button>
    <p>
        Se você não tem uma conta @Html.ActionLink("registre-se", "Register").
    </p>
}

@section Scripts{
    <script type="text/javascript">
        $(document).ready(function () {
            $("form").addClass("form-signin");
        });
    </script>
}
